Skip to content

feat(cc-search-bar): init component#1733

Merged
clara-layus-cc merged 2 commits into
masterfrom
feat/search-bar
Jun 2, 2026
Merged

feat(cc-search-bar): init component#1733
clara-layus-cc merged 2 commits into
masterfrom
feat/search-bar

Conversation

@clara-layus-cc
Copy link
Copy Markdown
Contributor

@clara-layus-cc clara-layus-cc commented Apr 27, 2026

What does this PR do?

  • Creating a new search bar component

How to review?

  • Check the commit,
  • Check the preview

@clara-layus-cc clara-layus-cc self-assigned this Apr 27, 2026
@clara-layus-cc clara-layus-cc marked this pull request as draft April 28, 2026 12:37
@clara-layus-cc clara-layus-cc force-pushed the feat/search-bar branch 3 times, most recently from 08e1189 to 8d3aa7b Compare April 28, 2026 14:25
@clara-layus-cc clara-layus-cc marked this pull request as ready for review April 28, 2026 14:32
@github-actions
Copy link
Copy Markdown
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/feat/search-bar/index.html.

This preview will be deleted once this PR is closed.

Copy link
Copy Markdown
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @clara-layus-cc

Comment thread src/components/cc-search-bar/cc-search-bar.events.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
@clara-layus-cc clara-layus-cc force-pushed the feat/search-bar branch 2 times, most recently from cc15826 to 3331f00 Compare April 29, 2026 12:46
Copy link
Copy Markdown
Member

@Galimede Galimede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Clara, overall mostly nitpicks and thoughts but LGTM, GG! 👏

Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/translations/translations.en.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.types.d.ts Outdated
Copy link
Copy Markdown
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @clara-layus-cc the component looks nice!

I have a few questions:

  • will there be async loading involved? The console will need the list of all the resources, it already has it in it's summary so I assumed you're going to rely on this? (this would mean no loading I think so it would be fine)
  • why not using the cc-dialog component here? Do you plan to use it from the console directly?
  • I think we could use the cc-dialog and let it handle the main heading + close button. Since the wireframes seem to have a smaller padding than the default dialog, we could use the padding custom props to customize these and match the wireframes while still using the cc-dialog component. We can discuss all of that in sync if needed 😉
  • the margin / gap between the section label and the border above it does not match the wireframes (margin after each section is fine, but margin before each section is too narrow)

Comment thread src/components/cc-search-bar/cc-search-bar.types.d.ts Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Copy link
Copy Markdown
Contributor

@HeleneAmouzou HeleneAmouzou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GG Clara ! I only left question/suggestion. I was also wondering if we should add some tests ? I would be curious to have other opinions on this.

Comment thread src/components/cc-search-bar/cc-search-bar.stories.js
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
@marion-izd
Copy link
Copy Markdown

Well done, Clara!
I think I’ve addressed the previous comments and questions, so here are my own comments and questions:

  • As Hélène pointed out, the title is a bit small; we should base it either on the title of the cc-dialog or on the title of a cc-block. For my part, I’ve based it on the title of a cc-block, so 18px
  • The headings for the results categories: these should be clearer/smaller to distinguish them from the results themselves (in the mock-up, they are 12px in light grey, whilst the results are 14px in the default colour)
  • The icons in the categories need to be made slightly larger (your component is 12px > mock-up is 16px)
  • Same for icons for external link (your component is 9px > mock-up is 16px)
  • As mentioned earlier, the colour of the badges in the dimmed version
  • I have a few comments about the hover/focus effect: In terms of alignment, when the mouse hovers over or focuses on it, it should be aligned with the category icon (There is currently a slight spacing). And the corner radius is small in hover (your component is 2px > mock-up il 8px) and 10px for focus.

I don't think I've left anything out. 💪 Good work, and please don't hesitate to ask me or drop me a line if you have any further questions.

@clara-layus-cc clara-layus-cc marked this pull request as draft May 6, 2026 13:43
@clara-layus-cc clara-layus-cc marked this pull request as ready for review May 7, 2026 07:46
Copy link
Copy Markdown
Contributor

@HeleneAmouzou HeleneAmouzou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for me !

Copy link
Copy Markdown
Member

@roberttran-cc roberttran-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice component! No additional comments beyond those already raised.

@marion-izd
Copy link
Copy Markdown

I’ve just had another look, particularly at the text in the two versions —‘empty’ and ‘no result’— and I agree with your suggestions.

  • Just a quick note on the ‘no result’ version: you could remove the full stop at the end (something David would probably point out 😉).
  • I have a question about the ‘empty’ section. I like the examples, but what about ‘is:app’? Will that be replaced automatically? Does it also work with keywords to find apps?

Great work again 💪

Copy link
Copy Markdown
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few a11y issues but almost there 👍

Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Comment thread src/components/cc-search-bar/cc-search-bar.js
Copy link
Copy Markdown
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for me, great job @clara-layus-cc 😎

Copy link
Copy Markdown
Member

@roberttran-cc roberttran-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a minor doc-related feedback for me, LGTM otherwise, hence the approval.

Comment thread src/components/cc-search-bar/cc-search-bar.js
Copy link
Copy Markdown
Member

@hsablonniere hsablonniere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @clara-layus-cc, I added a small comment, feel free to apply it or not and here are some changes I want :

  • The main bloc should be aligned to the top to prevent the input to move while typing.
  • The hover with the ">" shifts the content, I think we need to prevent this.

Notes :

  • I was wondering if I needed a clear() method but assigning value="" is enough.

Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
@clara-layus-cc clara-layus-cc force-pushed the feat/search-bar branch 2 times, most recently from 322d19d to ee847bb Compare May 29, 2026 13:54
Copy link
Copy Markdown
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small change to make but apart from that it's good to me!

Comment thread src/components/cc-search-bar/cc-search-bar.js Outdated
Copy link
Copy Markdown
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Well done Clara

@clara-layus-cc clara-layus-cc force-pushed the feat/search-bar branch 2 times, most recently from 5d8ba18 to 709a1ee Compare June 2, 2026 14:16
Copy link
Copy Markdown
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

Move the URL-origin check out of cc-link as a private method into a shared
utility, so other components (cc-search-bar) can reuse it.
@clara-layus-cc clara-layus-cc merged commit fd6b463 into master Jun 2, 2026
7 checks passed
@clara-layus-cc clara-layus-cc deleted the feat/search-bar branch June 2, 2026 14:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🔎 The preview has been automatically deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants